package com.hlhj.funlike_business.activity.fragment;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.example.mymvp.mvp.BaseFgm;
import com.hlhj.funlike_business.R;
import com.hlhj.funlike_business.bean.FoodListBean;
import com.hlhj.funlike_business.presenter.ShowFoodListFragmentPresenter;
import com.hlhj.funlike_business.views.ShowFoodListFragmentView;

import org.jetbrains.annotations.NotNull;

import java.util.List;

public class ShowFoodListFragment extends BaseFgm<ShowFoodListFragmentView,ShowFoodListFragmentPresenter> implements ShowFoodListFragmentView {
    private RecyclerView recycle_list;
    @Override
    public void doBeforInit() {

    }

    @Override
    public int getContentId() {
        return R.layout.fgm_foolist;
    }

    @NotNull
    @Override
    public ShowFoodListFragmentView bindView() {
        return this;
    }

    @NotNull
    @Override
    public ShowFoodListFragmentPresenter createPresenter() {
        return new ShowFoodListFragmentPresenter();
    }

    @Override
    public void initView() {
        recycle_list=rootView.findViewById(R.id.recycle_list);
        recycle_list.setLayoutManager(new LinearLayoutManager(getContext(),LinearLayoutManager.VERTICAL,false));

    }

    @Override
    public void logicStart() {
        getPresenter().LoadFoodList(getContext(),0,1,10);
    }

    @Override
    public void setListener() {

    }

    @Override
    public void showFoodList(List<FoodListBean.DataBeanX.DataBean> dataBeans) {

    }
}
